package cn.wolfcode.p2p.base.query;

import cn.wolfcode.p2p.base.util.DateUtil;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * Created by wolfcode-lanxw
 */
@Setter@Getter
public class PlatformBankInfoQueryObject extends QueryObjext {
    private Date beginDate;
    private Date endDate;
    private String tradeCode;
    private Long bankInfoId;
    public String getTradeCode() {
        return StringUtils.isNotBlank(tradeCode)?tradeCode:null;
    }
    public Date getBeginDate() {
        return DateUtil.getBeginDate(beginDate);
    }
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    public Date getEndDate() {
        return DateUtil.getEndDate(endDate);
    }
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }
}
